package net.hn.hnms.biz.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.hn.hnms.biz.project.domain.ProjectBudgetDetail;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ProjectBudgetDetailMapper extends BaseMapper<ProjectBudgetDetail> {
    @Update("<script>" +
            " update project_budget_detail set  del_flag = '1' " +
            " where project_budget_id = #{projectBudgetId}" +
            "</script>")
    void deleteProjectBudgetDetailById(@Param("projectBudgetId")String projectBudgetId);

    @Select("<script>" +
            " select project_budget_detail_id projectBudgetDetailId,project_budget_id projectBudgetId,title title," +
            " amount amount,remark remark,create_user_id createUserId,create_time createTime from project_budget_detail " +
            " where del_flag = '0' and project_budget_id = #{projectBudgetId}" +
            "</script>")
    List<ProjectBudgetDetail> getProjectBudgetDetailList(@Param("projectBudgetId")String projectBudgetId);
}
